import torch
import torch.nn as nn
import torch.nn.functional as F

class MyModule(nn.Module):
    def __init__(self,) -> None:
        super().__init__()

    def forward(self, x):
        x = x + 1
        return x

mymodel = MyModule()
result = mymodel(torch.tensor(1))
print("result:%s" % result)

class Model(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(1, 20, 5)
        self.conv2 = nn.Conv2d(20, 50, 5)

    def forward(self, x):
        x = F.relu(self.conv1(x))
        return F.relu(self.conv2(x))